<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<link rel="stylesheet" href="${staticServer}/inc/style/main.css" />
<link rel="stylesheet" href="${staticServer}/inc/style/page.css" />
<link rel="stylesheet" href="${staticServer}/css/struct_info.css" />
<script src="${staticServer}/inc/js/jquery.js"></script>
<script src="${staticServer}/inc/js/pageset.js"></script>
<script src="${staticServer}/inc/js/submitter.js"></script>
<script src="${staticServer}/js/web/admin_user_new.js?1.2"></script>
<script>
var contextPath='${contextPath}';

$(function(){
	$('#department').on('click',function(){
		var keyname = $("#department").val();
		$.post("${contextPath}/index/getDepartment.json", {
			"keyname" : keyname
		}, function(ms) {
			var list = ms.departmentList;
			var objHtml = "";
			for(var i=0;i<list.length;i++){
				objHtml += '<option value="'+list[i].keyname+'">'+list[i].name+'</option>'
			}
			$("#job").html(objHtml);
		});
	});
});
</script>
</head>

<body>

	<div id="container">
		<div id="title"></div>
		<table id="infotable">
			<tr>
				<th width="25%">姓名</th>
				<td width="75%"><input id="nickname" /></td>
			</tr>
			<tr>
				<th>办公地址</th>
				<td>
				<select id="region">
					<#if offList??>
						<#list offList as list>
							<option value="${list.keyname}" title="${list.address}">${list.name}</option>
						</#list>
					</#if>
				</select>
				</td>
			</tr>
			<tr>
				<th>部门 / 职位</th>
				<td>
					<select id="department">
					<#if depList??>
						<#list depList as list>
							<option value="${list.keyname}">${list.name}</option>
						</#list>
					</#if>
					</select>
					<select id="job">
							<option value=""></option>
					</select>
				</td>
			</tr>
			<tr>
				<th>用户组(基本权限)
					<p class="caption">决定该帐号拥有哪些功能的使用权限</p>
				</th>
				<td>
				<select id="usergroup">
				<#if groupList??>
					<#list groupList as list>
						<option value="${list.id}">${list.name}</option>
					</#list>
				</#if>
				</select></td>
			</tr>
			<tr>
				<th>选择QQ分组
				</th>
				<td>
				<select id="qqgroup">
				<#if qqlist??>
					<option value="">请选择</option>
					<#list qqlist as list>
						<#if list.id!=1>
						<option value="${list.id}">${list.name}</option>
						</#if>
					</#list>
				</#if>
				</select></td>
			</tr>
			<tr>
				<th>帐号</th>
				<td><input id="username" type="text" size="50" maxlength="30" /></td>
			</tr>
			<tr>
				<th>密码</th>
				<td><input id="password" type="password" size="50" maxlength="30" /></td>
			</tr>
			<tr>
				<th>确认密码</th>
				<td><input id="repassword" type="password" size="50" maxlength="30" /></td>
			</tr>
		</table>
		<div id="controlbar">
			<input type="button" class="submit" value="  保存新帐号  " />
		</div>
	</div>
</body>
</html>